package com.hitrust.gs.bean;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;

import com.hitrust.gs.service.GSBaseBean;
/**
 * 操作员的基本信息
 *
 */
public class GSOperatorBean implements GSBaseBean {
	/**
	 * 操作员组织机构编号
	 */
	private String gs_oper_org_id;
	/**
	 * 操作员帐号
	 */
	private String gs_oper_id;
	/**
	 * 操作员姓名
	 */
	private String gs_oper_name;
	/**
	 * 操作员密码
	 */
	private String gs_oper_pwd;
	/**
	 * 操作员级别
	 */
//	private String gs_oper_level;
	/**
	 * 操作员职位名称
	 */
	private String gs_oper_position;
	/**
	 * 操作员性别
	 */
	private String gs_oper_sex;
	/**
	 * 操作员联系电话
	 */
	private String gs_oper_phone;
	/**
	 * 操作员电子邮件
	 */
	private String gs_oper_email;
	/**
	 * 操作员有效性
	 */
	private String gs_oper_validity;
	/**
     * 用户执行过的交易
     */
    private ArrayList operatedFuncs = new ArrayList();

    /**
     * 最后修改时
     */
    private String gs_last_modify_dt;
	
    private ArrayList operatorRights;
    
    /**
     * @return 返回变量gs_last_modify_dt的值.
     */
    public String getGs_last_modify_dt() {
        return this.gs_last_modify_dt;
    }
    /**
     * @param aGs_last_modify_dt 设定变量gs_last_modify_dt的值.
     */
    public void setGs_last_modify_dt(String aGs_last_modify_dt) {
        this.gs_last_modify_dt = aGs_last_modify_dt;
    }
    public Object process(ResultSet aResultSet) throws SQLException {
		GSOperatorBean tGSOperatorBean = new GSOperatorBean();
		tGSOperatorBean.gs_oper_id = aResultSet.getString("GS_OPER_ID").trim();
		tGSOperatorBean.gs_oper_org_id = aResultSet.getString("GS_OPER_ORG_ID").trim();
		tGSOperatorBean.gs_oper_name = aResultSet.getString("GS_OPER_NAME").trim();
		tGSOperatorBean.gs_oper_pwd = aResultSet.getString("GS_OPER_PWD").trim();
//		tGSOperatorBean.gs_oper_level = aResultSet.getString("GS_OPER_LEVEL").trim();
		tGSOperatorBean.gs_oper_position = aResultSet.getString("GS_OPER_POSITION") == null ? "" : aResultSet.getString("GS_OPER_POSITION").trim();
		tGSOperatorBean.gs_oper_sex = aResultSet.getString("GS_OPER_SEX");
		tGSOperatorBean.gs_oper_validity = aResultSet.getString("GS_OPER_VALIDITY");
		tGSOperatorBean.gs_oper_phone = aResultSet.getString("GS_OPER_PHONE") == null? "" : aResultSet.getString("GS_OPER_PHONE").trim();
		tGSOperatorBean.gs_oper_email = aResultSet.getString("GS_OPER_EMAIL") == null? "" : aResultSet.getString("GS_OPER_EMAIL").trim();
        tGSOperatorBean.gs_last_modify_dt = aResultSet.getString("GS_LAST_MODIFY_DT");
		return tGSOperatorBean;
	}
    /**
     * 取得用户返回页面的路径
     * 
     * @return String 用户返回页面的路径 
     */
    public String getReturnPath(){
        if (operatedFuncs.size() == 0){
            return "/login.jsp";//返回登录页面
        }
        String tPath = (String)operatedFuncs.get(operatedFuncs.size() -1);
        return tPath.substring(0, 6) + "01" + tPath.substring(8);//取功能首页面的交易代码
    }
    /**
     * @return Returns the gs_oper_email.
     */
    public String getGs_oper_email() {
        return this.gs_oper_email;
    }
    /**
     * @param aGs_oper_email The gs_oper_email to set.
     */
    public void setGs_oper_email(String aGs_oper_email) {
        this.gs_oper_email = aGs_oper_email;
    }
    /**
     * @return Returns the gs_oper_id.
     */
    public String getGs_oper_id() {
        return this.gs_oper_id;
    }
    /**
     * @param aGs_oper_id The gs_oper_id to set.
     */
    public void setGs_oper_id(String aGs_oper_id) {
        this.gs_oper_id = aGs_oper_id;
    }
    /**
     * @return Returns the gs_oper_level.
     */
//    public String getGs_oper_level() {
//        return this.gs_oper_level;
//    }
//    /**
//     * @param aGs_oper_level The gs_oper_level to set.
//     */
//    public void setGs_oper_level(String aGs_oper_level) {
//        this.gs_oper_level = aGs_oper_level;
//    }
    /**
     * @return Returns the gs_oper_name.
     */
    public String getGs_oper_name() {
        return this.gs_oper_name;
    }
    /**
     * @param aGs_oper_name The gs_oper_name to set.
     */
    public void setGs_oper_name(String aGs_oper_name) {
        this.gs_oper_name = aGs_oper_name;
    }
    /**
     * @return Returns the gs_oper_org_id.
     */
    public String getGs_oper_org_id() {
        return this.gs_oper_org_id;
    }
    /**
     * @param aGs_oper_org_id The gs_oper_org_id to set.
     */
    public void setGs_oper_org_id(String aGs_oper_org_id) {
        this.gs_oper_org_id = aGs_oper_org_id;
    }
    /**
     * @return Returns the gs_oper_phone.
     */
    public String getGs_oper_phone() {
        return this.gs_oper_phone;
    }
    /**
     * @param aGs_oper_phone The gs_oper_phone to set.
     */
    public void setGs_oper_phone(String aGs_oper_phone) {
        this.gs_oper_phone = aGs_oper_phone;
    }
    /**
     * @return Returns the gs_oper_position.
     */
    public String getGs_oper_position() {
        return this.gs_oper_position;
    }
    /**
     * @param aGs_oper_position The gs_oper_position to set.
     */
    public void setGs_oper_position(String aGs_oper_position) {
        this.gs_oper_position = aGs_oper_position;
    }
    /**
     * @return Returns the gs_oper_pwd.
     */
    public String getGs_oper_pwd() {
        return this.gs_oper_pwd;
    }
    /**
     * @param aGs_oper_pwd The gs_oper_pwd to set.
     */
    public void setGs_oper_pwd(String aGs_oper_pwd) {
        this.gs_oper_pwd = aGs_oper_pwd;
    }
    /**
     * @return Returns the gs_oper_sex.
     */
    public String getGs_oper_sex() {
        return this.gs_oper_sex;
    }
    /**
     * @param aGs_oper_sex The gs_oper_sex to set.
     */
    public void setGs_oper_sex(String aGs_oper_sex) {
        this.gs_oper_sex = aGs_oper_sex;
    }
    /**
     * @return Returns the gs_oper_validity.
     */
    public String getGs_oper_validity() {
        return this.gs_oper_validity;
    }
    /**
     * @param aGs_oper_validity The gs_oper_validity to set.
     */
    public void setGs_oper_validity(String aGs_oper_validity) {
        this.gs_oper_validity = aGs_oper_validity;
    }
    /**
     * @return 返回变量operatedFuncs的值.
     */
    public ArrayList getOperatedFuncs() {
        return this.operatedFuncs;
    }
    /**
     * @param aOperatedFuncs 设定变量operatedFuncs的值.
     */
    public void setOperatedFuncs(ArrayList aOperatedFuncs) {
        this.operatedFuncs = aOperatedFuncs;
    }
    /**
     * @return 返回变量operatorRights的值.
     */
    public ArrayList getOperatorRights() {
        return this.operatorRights;
    }
    /**
     * @param aOperatorRights 设定变量operatorRights的值.
     */
    public void setOperatorRights(ArrayList aOperatorRights) {
        this.operatorRights = aOperatorRights;
    }
    
    private String gs_key_word;
    public void setGs_key_word(String keyWord)
    {
    	gs_key_word = keyWord;
    }
    public String getGs_key_word()
    {
    	return gs_key_word;
    }

}
